/*
** strlcat.c for  in /home/gueux_g/piscine/Jour_07
**
** Made by gregory gueux
** Login   <gueux_g@epitech.net>
**
** Started on  Tue Oct  9 06:23:32 2012 gregory gueux
** Last update Thu Oct 11 20:36:54 2012 gregory gueux
*/

int	my_strlcat(char *dest, char *src, int size)
{
  int	i;
  int	y;
  int	save;

  i = 0;
  y = 0;
  while (dest[i] != '\0')
    i++;
  save = i;
  while (src[y])
    {
      dest[i++] = src[y++];
    }
  if (i <= size)
    {
      dest[i] = 0;
      return (i);
    }
  else
    {
      dest[save] = 0;
      return (size + y);
    }
}
